<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
  ${sessionScope.flashMsgs}<span id="span01" style="color: red">5</span>秒后自动跳转到登录页面，如果没有跳转点击<a href="${pageContext.request.contextPath}/login.jsp">登录</a>
  <script language="JavaScript">
      function fun1() {
          var span01 = document.getElementById("span01");
          var i = span01.innerHTML;
          if(i>0){
              i = i-1;
              span01.innerHTML = i;
          }
      }
      window.setInterval("fun1()",1000);
      <%
      String contextPath = request.getContextPath();
      response.setHeader("refresh","5;url="+contextPath+"/register.jsp");
      %>
  </script>
</body>
</html>